package a.a006;

import java.lang.reflect.InvocationTargetException;
import java.util.Date;

import org.apache.commons.beanutils.BeanUtils;

public class Student {
	
	private int id;
	private String name;
	private String address;
	private Date birthDay;
	
	private String batch;
	
	
	@Override
	public String toString() {
		return "Student [id=" + id + ", name=" + name + ", address=" + address
				+ ", birthDay=" + birthDay + ", batch=" + batch + "]";
	}

	
	public Student() {
		super();
	}
	
	

	public Student(int id, String name, String address) {
		super();
		this.id = id;
		this.name = name;
		this.address = address;
	}


	public Student(int id, String name, String address, Date birthDay, String batch) {
		super();
		this.id = id;
		this.name = name;
		this.address = address;
		this.birthDay = birthDay;
		this.batch = batch;
	}




	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	public Date getBirthDay() {
		return birthDay;
	}
	public void setBirthDay(Date birthDay) {
		this.birthDay = birthDay;
	}
	

	public String getBatch() {
		return batch;
	}

	public void setBatch(String batch) {
		this.batch = batch;
	}



	public static void main(String[] args) throws IllegalAccessException, InvocationTargetException {
//		Student student = new Student(111, "aaa", "zxc", new Date());
//		
//		/**
//		 * 依赖于 getter、setter
//		 */
//		BeanUtils.setProperty(student, "name", "张三");
//		
//		System.out.println(student);
	}
}
